import request from '@/utils/request'

// 查询收款记账列表
export function listShoukuan(query) {
  return request({
    url: '/jiesuan/shoukuan/list',
    method: 'get',
    params: query
  })
}

// 查询收款记账详细
export function getShoukuan(id) {
  return request({
    url: '/jiesuan/shoukuan/' + id,
    method: 'get'
  })
}
// 查询收款记账详细
export function getSurplusShoukuan(ywId) {
  return request({
    url: '/jiesuan/shoukuan/getSurplusShoukuan/' + ywId,
    method: 'get'
  })
}

// 新增收款记账
export function addShoukuan(data) {
  return request({
    url: '/jiesuan/shoukuan',
    method: 'post',
    data: data
  })
}

// 修改收款记账
export function updateShoukuan(data) {
  return request({
    url: '/jiesuan/shoukuan',
    method: 'put',
    data: data
  })
}

// 删除收款记账
export function delShoukuan(id) {
  return request({
    url: '/jiesuan/shoukuan/' + id,
    method: 'delete'
  })
}
